module top_module( 
    input [15:0] a, b,
    input cin,
    output cout,
    output [15:0] sum );

    wire [3:0] carry;

    bcd_fadd inst_add0 (a[3:0], b[3:0], cin, carry[0], sum[3:0]);
    bcd_fadd inst_add[3:1] (a[15:4], b[15:4], carry[2:0], carry[3:1], sum[15:4]);

    assign cout = carry[3];

endmodule
